.class public Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/f;
.super Ljava/lang/Object;
.source "Track.java"


# instance fields
.field private a:J

.field private b:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/e;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>()V
    .locals 1

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/f;->b:Ljava/util/List;

    return-void
.end method


# virtual methods
.method public a()J
    .locals 2

    .line 1
    iget-wide v0, p0, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/f;->a:J

    return-wide v0
.end method

.method public a(JJ)Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/c;
    .locals 10

    .line 8
    iget-wide v0, p0, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/f;->a:J

    .line 9
    iget-object v2, p0, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/f;->b:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v2

    move-wide v5, v0

    :cond_0
    :goto_0
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_5

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/c;

    .line 10
    iget-wide v3, v0, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/c;->c:J

    const/4 v1, 0x1

    const/4 v7, 0x0

    cmp-long v8, p1, v3

    if-ltz v8, :cond_1

    const/4 v3, 0x1

    goto :goto_1

    :cond_1
    const/4 v3, 0x0

    :goto_1
    iget-wide v8, v0, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/c;->d:J

    cmp-long v4, p1, v8

    if-gez v4, :cond_2

    goto :goto_2

    :cond_2
    const/4 v1, 0x0

    :goto_2
    and-int/2addr v1, v3

    if-eqz v1, :cond_3

    const/4 v0, 0x0

    return-object v0

    .line 11
    :cond_3
    iget-wide v3, v0, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/c;->d:J

    cmp-long v1, p1, v3

    if-lez v1, :cond_4

    goto :goto_0

    .line 12
    :cond_4
    iget-wide v0, v0, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/c;->c:J

    cmp-long v3, p1, v0

    if-gez v3, :cond_0

    .line 13
    invoke-static {v5, v6, v0, v1}, Ljava/lang/Math;->min(JJ)J

    move-result-wide v5

    goto :goto_0

    :cond_5
    sub-long v0, v5, p1

    const-wide/16 v2, 0x7d0

    cmp-long v4, v0, v2

    if-ltz v4, :cond_6

    .line 14
    new-instance v7, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/e;

    add-long v5, p1, v2

    move-object v0, v7

    move-wide v1, p3

    move-wide v3, p1

    invoke-direct/range {v0 .. v6}, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/e;-><init>(JJJ)V

    goto :goto_3

    .line 15
    :cond_6
    new-instance v7, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/e;

    move-object v0, v7

    move-wide v1, p3

    move-wide v3, p1

    invoke-direct/range {v0 .. v6}, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/e;-><init>(JJJ)V

    .line 16
    :goto_3
    invoke-virtual {p0, v7}, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/f;->a(Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/e;)V

    return-object v7
.end method

.method public a(Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/e;)V
    .locals 2

    .line 17
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "addPiece:"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    const-string v1, "Track"

    invoke-static {v1, v0}, Lcom/esfile/screen/recorder/utils/n;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 18
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/f;->b:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    return-void
.end method

.method public a(J)Z
    .locals 10

    .line 2
    iget-wide v0, p0, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/f;->a:J

    .line 3
    iget-object v2, p0, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/f;->b:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :cond_0
    :goto_0
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    const/4 v4, 0x1

    const/4 v5, 0x0

    if-eqz v3, :cond_5

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/c;

    .line 4
    iget-wide v6, v3, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/c;->c:J

    cmp-long v8, p1, v6

    if-ltz v8, :cond_1

    const/4 v6, 0x1

    goto :goto_1

    :cond_1
    const/4 v6, 0x0

    :goto_1
    iget-wide v7, v3, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/c;->d:J

    cmp-long v9, p1, v7

    if-gez v9, :cond_2

    goto :goto_2

    :cond_2
    const/4 v4, 0x0

    :goto_2
    and-int/2addr v4, v6

    if-eqz v4, :cond_3

    return v5

    .line 5
    :cond_3
    iget-wide v4, v3, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/c;->d:J

    cmp-long v6, p1, v4

    if-lez v6, :cond_4

    goto :goto_0

    .line 6
    :cond_4
    iget-wide v3, v3, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/c;->c:J

    cmp-long v5, p1, v3

    if-gez v5, :cond_0

    .line 7
    invoke-static {v0, v1, v3, v4}, Ljava/lang/Math;->min(JJ)J

    move-result-wide v0

    goto :goto_0

    :cond_5
    sub-long/2addr v0, p1

    const-wide/16 p1, 0x3e8

    cmp-long v2, v0, p1

    if-ltz v2, :cond_6

    goto :goto_3

    :cond_6
    const/4 v4, 0x0

    :goto_3
    return v4
.end method

.method public a(JJJ)Z
    .locals 4

    .line 19
    invoke-virtual {p0, p1, p2}, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/f;->b(J)Landroid/util/Pair;

    move-result-object v0

    if-nez v0, :cond_0

    const/4 p1, 0x0

    return p1

    .line 20
    :cond_0
    iget-object v1, v0, Landroid/util/Pair;->first:Ljava/lang/Object;

    check-cast v1, Ljava/lang/Long;

    invoke-virtual {v1}, Ljava/lang/Long;->longValue()J

    move-result-wide v1

    cmp-long v3, p3, v1

    if-gez v3, :cond_1

    .line 21
    iget-object p3, v0, Landroid/util/Pair;->first:Ljava/lang/Object;

    check-cast p3, Ljava/lang/Long;

    invoke-virtual {p3}, Ljava/lang/Long;->longValue()J

    move-result-wide p3

    .line 22
    :cond_1
    iget-object v1, v0, Landroid/util/Pair;->second:Ljava/lang/Object;

    check-cast v1, Ljava/lang/Long;

    invoke-virtual {v1}, Ljava/lang/Long;->longValue()J

    move-result-wide v1

    cmp-long v3, p5, v1

    if-lez v3, :cond_2

    .line 23
    iget-object p5, v0, Landroid/util/Pair;->second:Ljava/lang/Object;

    check-cast p5, Ljava/lang/Long;

    invoke-virtual {p5}, Ljava/lang/Long;->longValue()J

    move-result-wide p5

    .line 24
    :cond_2
    invoke-virtual {p0, p1, p2}, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/f;->c(J)Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/e;

    move-result-object p1

    .line 25
    iput-wide p3, p1, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/c;->c:J

    .line 26
    iput-wide p5, p1, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/c;->d:J

    const/4 p1, 0x1

    return p1
.end method

.method public b(J)Landroid/util/Pair;
    .locals 10
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(J)",
            "Landroid/util/Pair<",
            "Ljava/lang/Long;",
            "Ljava/lang/Long;",
            ">;"
        }
    .end annotation

    .line 2
    new-instance v0, Ljava/util/ArrayList;

    iget-object v1, p0, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/f;->b:Ljava/util/List;

    invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V

    .line 3
    invoke-virtual {p0, p1, p2}, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/f;->c(J)Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/e;

    move-result-object p1

    if-nez p1, :cond_0

    const/4 p1, 0x0

    return-object p1

    .line 4
    :cond_0
    invoke-static {v0}, Ljava/util/Collections;->sort(Ljava/util/List;)V

    const-wide/16 v1, 0x0

    .line 5
    iget-wide v3, p0, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/f;->a:J

    .line 6
    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object p2

    :cond_1
    :goto_0
    invoke-interface {p2}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_3

    invoke-interface {p2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/c;

    .line 7
    iget-wide v5, v0, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/c;->d:J

    iget-wide v7, p1, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/c;->c:J

    cmp-long v9, v5, v7

    if-gtz v9, :cond_2

    .line 8
    invoke-static {v1, v2, v5, v6}, Ljava/lang/Math;->max(JJ)J

    move-result-wide v1

    .line 9
    :cond_2
    iget-wide v5, v0, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/c;->c:J

    iget-wide v7, p1, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/c;->d:J

    cmp-long v0, v5, v7

    if-ltz v0, :cond_1

    .line 10
    invoke-static {v3, v4, v5, v6}, Ljava/lang/Math;->min(JJ)J

    move-result-wide v3

    goto :goto_0

    .line 11
    :cond_3
    new-instance p1, Landroid/util/Pair;

    invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object p2

    invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v0

    invoke-direct {p1, p2, v0}, Landroid/util/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V

    return-object p1
.end method

.method public b()Ljava/util/List;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List<",
            "Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/e;",
            ">;"
        }
    .end annotation

    .line 1
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/f;->b:Ljava/util/List;

    return-object v0
.end method

.method public c(J)Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/e;
    .locals 5

    .line 1
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/f;->b:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :cond_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_1

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/e;

    .line 2
    iget-wide v2, v1, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/c;->a:J

    cmp-long v4, v2, p1

    if-nez v4, :cond_0

    return-object v1

    :cond_1
    const/4 p1, 0x0

    return-object p1
.end method

.method public d(J)Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/e;
    .locals 5

    .line 1
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/f;->b:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :cond_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_1

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/e;

    .line 2
    iget-wide v2, v1, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/c;->a:J

    cmp-long v4, v2, p1

    if-nez v4, :cond_0

    return-object v1

    :cond_1
    const/4 p1, 0x0

    return-object p1
.end method

.method public e(J)Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/c;
    .locals 5

    .line 1
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/f;->b:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :cond_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_1

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/e;

    .line 2
    iget-wide v2, v1, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/c;->c:J

    cmp-long v4, p1, v2

    if-ltz v4, :cond_0

    iget-wide v2, v1, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/c;->d:J

    cmp-long v4, p1, v2

    if-gez v4, :cond_0

    return-object v1

    :cond_1
    const/4 p1, 0x0

    return-object p1
.end method

.method public f(J)V
    .locals 0

    .line 1
    iput-wide p1, p0, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/f;->a:J

    return-void
.end method

.method public toString()Ljava/lang/String;
    .locals 4

    .line 1
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "\n"

    .line 2
    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 3
    iget-object v2, p0, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/f;->b:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :goto_0
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    if-eqz v3, :cond_0

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/esfile/screen/recorder/videos/edit/activities/caption/multitrack/c;

    .line 4
    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    .line 5
    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    goto :goto_0

    :cond_0
    const-string v1, "}"

    .line 6
    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 7
    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method
